import { IsNotEmpty, IsString, MinLength } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class CreateMessageDTO {
  @ApiProperty({ example: '这是一条评论内容', description: '评论内容' })
  @IsNotEmpty({ message: '评论内容不能为空' })
  @IsString({ message: '评论内容必须是字符串' })
  @MinLength(1, { message: '评论内容长度不能少于1个字符' })
  content: string;
}